<template>
  <div class="work_list_bom_tree">
    <mes-tree @selectNode="selectNode" class="mes_tree"></mes-tree>
    <work-list-bom-tree-detail ref="comDetail" class="work_list_bom_tree_detail"></work-list-bom-tree-detail>
  </div>
</template>

<script>
import {MesTree, WorkListBomTreeDetail} from './components'

export default {
  name: 'WorkListBomTree',
  components: {
    MesTree,
    WorkListBomTreeDetail
  },
  methods: {
    refresh() {
      this.$refs.comDetail.init()
    },
    selectNode(workorderId) {
      this.$refs.comDetail.setWorkorderid(workorderId)
    }
  }
}
</script>

<style lang="less" scoped>
  .work_list_bom_tree {
    display: flex;
    overflow-x: hidden;
    height: 100%;
    .mes_tree {
      flex: 0 0 350px;
    }
    .work_list_bom_tree_detail {
      flex: 1;
      overflow-x: auto;
    }
  }
</style>
